Skip to content

refactor(vm): source runtime pins only from pins.env - #4373

Open
benoitf wants to merge 1 commit into
NVIDIA:mainfrom
benoitf:refactor/dedupe-vm-runtime-pins/benoitf
Open

benoitf wants to merge 1 commit into
NVIDIA:mainfrom
benoitf:refactor/dedupe-vm-runtime-pins/benoitf

Conversation

@benoitf

@benoitf benoitf commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Summary

The VM runtime scripts loaded pins.env optionally and kept their own copies of the LIBKRUN_REF and UMOCI_VERSION defaults, so bumping a pin meant updating the same value in several files. This PR makes pins.env the only place these values are defined. Bumping a pin now touches one file.

Related Issue

Follow-up to this review discussion on #4282, which asked why the pin was not specified only once in pins.env.

Changes

  • Source pins.env without 2>/dev/null || true in the 5 VM scripts, so they fail if the file is missing.
  • Remove the duplicated LIBKRUN_REF defaults from build-libkrun.sh and build-libkrun-macos.sh.
  • Remove the duplicated UMOCI_VERSION defaults from compress-vm-runtime.sh, download-kernel-runtime.sh, and package-vm-runtime.sh.
  • In build-libkrun.sh, remove the code paths that ran with no pinned ref, now that LIBKRUN_REF and LIBKRUNFW_REF are always set. An invalid LIBKRUN_REF now fails at checkout. Before, a trailing || true let the build continue on upstream HEAD.

Environment overrides such as LIBKRUN_REF=v1.19.4 tasks/scripts/vm/build-libkrun.sh still work. pins.env assigns each pin as VAR="${VAR:-<default>}", so a value set in the environment takes precedence.

Testing

  • Checks appropriate to the affected code and behavior pass (bash -n on all VM scripts; pins.env is now the only file under tasks/ and crates/ that defines these pins; source pins.env keeps an env-provided LIBKRUN_REF)
  • Unit tests added/updated (if applicable)
  • E2E tests added/updated (if applicable)

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)
  • Architecture docs updated (if applicable)

@copy-pr-bot

copy-pr-bot Bot commented Oct 9, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

The VM runtime scripts sourced pins.env optionally and duplicated the
LIBKRUN_REF and UMOCI_VERSION defaults, so every bump had to update the
same value in several files.

Require pins.env, drop the duplicated defaults, and fail on an invalid
LIBKRUN_REF instead of silently building upstream HEAD. Environment
overrides still take precedence through the defaults in pins.env.

Signed-off-by: Florent Benoit <fbenoit@redhat.com>
@benoitf
benoitf force-pushed the refactor/dedupe-vm-runtime-pins/benoitf branch from 5583ed4 to ac0d48e Compare October 9, 2026 13:10
@benoitf

benoitf commented Oct 9, 2026

Copy link
Copy Markdown
Contributor Author

cc @elezar @TaylorMutch following discussion #4282 (comment)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant